package com.cinema.util;

import cn.hutool.crypto.symmetric.SymmetricAlgorithm;
import cn.hutool.crypto.symmetric.SymmetricCrypto;

public class DeCodeUtil {
//    static byte[] key = SecureUtil.generateKey(SymmetricAlgorithm.AES.getValue()).getEncoded();
//随机生成密钥
    static byte[] key =new byte[] {-36, 45, -106, 23, -19, 35, 6, -102, 27, -33, -33, 40, -2, 34, 56, -68};
    //构建
    static SymmetricCrypto aes = new SymmetricCrypto(SymmetricAlgorithm.AES, key);

    public static String decode(String password){
        String encryptHex = aes.encryptHex(password);
        return encryptHex;
    }
    public static void main(String[] args){
        System.out.println(new String(key));
        String pass=decode("123123");
        System.out.println(pass);
    }
}


















